<template>
 <div class="login-container">
     <div class="login-box">
         <button @click="login">点击登录</button>
     </div>
 </div>
</template>

<script>
export default {
    data(){
         return{}
    },
    created(){},
    methods:{
        login(){
            // 用户信息存在本地存储
            let arr = ['/home','/user','/login','/']
            localStorage.setItem('arr',JSON.stringify(arr))
            // 跳转到首页
            this.$router.push('/')
        }
    },
    components:{}
}

</script>
<style scoped>
.login-container {
    width: 100%;
    height: 100vh;
    background-image: linear-gradient(to right,blue,purple);
    display: flex;
    justify-content: center;
    align-items: center;
}
.login-box {
    width: 400px;
    height: 300px;
    background-color: #fff;
    box-shadow: 0 0 10px #000;
    border-radius: 20px;
}
</style>